package kr.co.bettersoft.usedmarketandroid.activity;

import kr.co.bettersoft.usedmarketandroid.fragment.FragmentMain;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.Window;
/**
 * redirect 용.
 * @author blue
 *
 */
public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature( Window.FEATURE_NO_TITLE );		// no title

		setContentView(R.layout.activity_main);

		new Thread(
				new Runnable(){
					public void run(){
						try{
							Thread.sleep(2000);		// 초기 로딩 시간. 2초간 인트로 화면 보여줌
							Intent intent = new Intent(MainActivity.this, FragmentMain.class);
							startActivity(intent);
							finish();
						}catch(InterruptedException ie){
							ie.printStackTrace();
							finish();
						}
					}
				}
		).start();
				
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
